
package com.kilomob.grady.utils;

import java.io.PrintWriter;
import java.io.StringWriter;

public final class StackTraceUtil {

    public static String stackTrace(Throwable t) {
        if (t == null) {
            return "null";
        }

        StringWriter out = new StringWriter();
        t.printStackTrace(new PrintWriter(out));
        return out.toString();
    }

    private StackTraceUtil() {}
}
